<template>

  <div>
    <div>
      <div style="box-shadow: 0 0 10px rgba(0,0,0,.1); padding: 10px 20px; border-radius: 5px; margin-bottom: 10px">
        早安，祝你开心每一天!
      </div>
      <el-card style="width: 500px">
        <div slot="header" class="clearfix">
          <span>智慧校园，带你做毕设2024</span>
        </div>
        <div>
          2024毕设正式开始了!带你手把手敲出来!
          <div style="margin-top:20px">
            <div style="margin:10px"><strong>主题色</strong></div>
            <el-button type="primary">按钮</el-button>
            <el-button type="success">按钮</el-button>
            <el-button type="warning">按钮</el-button>
            <el-button type="danger">按钮</el-button>
            <el-button type="info">按纽</el-button>
          </div>
        </div>
      </el-card>
    </div>
    <div style="display: flex;margin-top: 100px">
     <div id="main" style="width: 600px;height:400px;flex: 1"></div><!-- zzt -->
      <div id="bzt" style="width: 600px;height:400px; flex: 1"></div><!-- bzt -->
    </div>
  </div>
</template>

<script>
import * as echarts from 'echarts';//echarts饼图


export default {

  name: "Apache",
  created() { },
  data() {
    return {

    };
  },
  props: {},
  mounted() {
    this.initChart()
    this.bzt()
  },


  methods: {
    initChart() {
      var chartDom = document.getElementById('main');
      var myChart = echarts.init(chartDom);
      var option;

      option = {
        xAxis: {
          type: '',
          data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
        },
        yAxis: {
          type: 'value'
        },
        series: [
          {
            data: [120, 200, 150, 80, 70, 110, 130],
            type: 'bar'
          }
        ]
      };
      option && myChart.setOption(option);
    },
    bzt() {
      var chartDom = document.getElementById('bzt');
      var myChart = echarts.init(chartDom);
      var option;

      option = {
        title: {
          text: '饼状图',
          subtext: 'Fake Data',
          left: 'center'
        },
        tooltip: {
          trigger: 'item'
        },
        legend: {
          orient: 'vertical',
          left: 'left'
        },
        series: [
          {
            name: 'Access From',
            type: 'pie',
            radius: '50%',
            data: [
              { value: 1048, name: 'Search Engine' },
              { value: 735, name: 'Direct' },
              { value: 580, name: 'Email' },
              { value: 484, name: 'Union Ads' },
              { value: 300, name: 'Video Ads' }
            ],
            emphasis: {
              itemStyle: {
                shadowBlur: 10,
                shadowOffsetX: 0,
                shadowColor: 'rgba(0, 0, 0, 0.5)'
              }
            }
          }
        ]
      };
      option && myChart.setOption(option);
    }

  },

};

</script>

<style scoped></style>
